import xlrd

wb = xlrd.open_workbook(filename="Login_a.xls", encoding_override=True)
sh = wb.sheet_by_index(0)
rows = sh.nrows
cols = sh.ncols


class Data:
    def success_a(self):
        success = []
        for x in range(1, rows):
            for y in range(cols):
                if x == 1 and y <= 1:
                    success.append([sh.cell_value(x, y), sh.cell_value(x, y + 1), sh.cell_value(x, 3),x])
        success.pop()
        return success

    def error_a(self):
        error = []

        for x in range(1, rows):
            for y in range(cols):
                if x > 1 and y <= 1:
                    error.append([sh.cell_value(x, y), sh.cell_value(x, y + 1), sh.cell_value(x, 3),x])
        for i in error:
            if '输入账号' in i[1]:
                error.remove(i)
        return error

